const mongoose = require('mongoose')
const Schema = mongoose.Schema;
const { BaseParameter } = require('../base/model')

const packageSchema = new Schema({
  ...BaseParameter,
  /**
   * 标题
   */
  "name": {type: String, default: ''},
  /**
   * 封面图
   */
  "cover": {type: String, default: ''},
  /**
   * 类型
   */
  "type": {type: String, default: ''},
  /**
   * 内容
   */
  "content": {type: String, default: ''},
  /**
   * 描述
   */
  "describe": {type: String, default: ''},
  /**
   * 包的URL
   */
  "url": {type: String, default: ''},
  /**
   * 时间
   */
  "date": {type: Date, default: new Date()},
});

const Package = mongoose.model('Package', packageSchema, 'packages');


module.exports = Package
